12bb2efacf18fae906edbb43b17cb4fbf7271d87,fabric-zookeeper/src/main/java/org/fusesource/fabric/zookeeper/internal/KarafAgentRegistration.java,KarafAgentRegistration,onConnected,#,67

Before Change


            String versionNode = CONFIG_AGENT.getPath(name);
            String profileNode = CONFIG_VERSIONS_AGENT.getPath(version, name);

            zooKeeper.createOrSetWithParents(versionNode, version, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
            zooKeeper.createOrSetWithParents(profileNode, profiles, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);

            registerDomains();

After Change


            String versionNode = CONFIG_AGENT.getPath(name);
            String profileNode = CONFIG_VERSIONS_AGENT.getPath(version, name);

            if (zooKeeper.exists(versionNode) == null) {
                zooKeeper.createOrSetWithParents(versionNode, version, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
            }
            if (zooKeeper.exists(profileNode) == null) {
                zooKeeper.createOrSetWithParents(profileNode, profiles, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);